------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/Analyses.log
  log type:  text
 opened on:   9 Nov 2023, 12:43:33

. do "/var/folders/h1/2snwzn456fn65_lntc_1khf80000gn/T//SD30143.000000"

. 
. /********************************************************************/
. /********************************************************************/
. ///*** The Incentives of Leaders in International Organizations: ***///
> ///***       Evidence from the UN General Assembly          *********///
> /********************************************************************/
. /********************************************************************/
. 
. 
. 
. /*****************************************************************/
. ///***     Figure 1 Timeline ***///
> /*****************************************************************/
. 
. clear

. use estimation_file

. 
. sort iso3n year

. by year, sort: egen demleader=mean(executive) if vdem==1
(6,268 missing values generated)

. by year, sort: egen nodemleader=mean(executive) if vdem==0
(4,519 missing values generated)

. replace demleader= demleader*100
(3,456 real changes made)

. replace nodemleader= nodemleader*100
(4,928 real changes made)

. by year, sort: egen numleader=mean(executive)

. replace numleader= numleader*100
(9,577 real changes made)

. 
. 
. graph twoway  line numleader year , yaxis(1) lpattern(solid) lwidth(medthick) lcolor(black)  || ///
> line demleader year,   lpattern(shortdash)   || ///
> line nodemleader year, lpattern(solid)   lcolor(gs12) lwidth(thin)  yaxis(1) ///
> xlabel(1945(5)2020,  valuelabel angle(45)) ///
> ylabel(0(10)60, axis(1) valuelabel angle(360)) ///
> ytitle("Percentage", axis(1)) ///
> plotregion(margin(r+1 t+0.5)) ///
> xtitle("Year") ytitle("Percentage of speakers")   scheme(s1mono)  ///
> legend(on order(1 "All" 2 "Democracy" 3 "Dictatorship")  ///
>  size(medsize) region(lcolor(white)) rows(1) ) 
(note:  named style medsize not found in class gsize, default attributes used)

. graph export output/timeline_all_regimes.pdf, replace
(file /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/timeline_all_regimes.pdf written in PDF format)

. 
. drop numleader demleader nodemleader

. clear

. 
. 
. /*****************************************************************/
. ///***  Table 1: Countries that Send Their Leaders Most and Least ***///
> /*****************************************************************/
. 
. clear

. use estimation_file

. keep country executive

. drop if executive==0
(7,780 observations deleted)

. collapse (sum) executive, by(country)

. sort executive

. /* only top and bottom countries from the list are displayed */
. 
. 
. /*****************************************************************/
. ///***  Figure 1: Countries and Their Heads of State at the UN, Globally ***///
> /*****************************************************************/
. 
. /* create a file for making a map */
. clear

. use estimation_file

. gen leader=executive

. gen iso3n2=iso3n

. replace iso3n2=643 if iso3n2==810
(72 real changes made)

. replace iso3n2=203 if iso3n2==200
(47 real changes made)

. replace iso3n2=729 if iso3n2==736
(64 real changes made)

. replace iso3n2=834 if iso3n2==835
(57 real changes made)

. replace iso3n2=887 if iso3n2==886
(13 real changes made)

. replace iso3n2=688 if iso3n2==890
(64 real changes made)

. replace iso3n2=158 if iso3n2==0
(0 real changes made)

. collapse (mean) leader, by(iso3n2)

. /* present as per cent */
. gen leader2=leader*100

. saveold output/leaders_map, replace version(12)
(saving in Stata 12 format, which can be read by Stata 11 or 12)
file output/leaders_map.dta saved

. 
. /* run Figure1_map.R in R to replicate Figure 1 */
. 
. 
. 
. /**********************************************************************************/
. /* Table 2 Prestige, Domestic Considerations, and Leaders at the UN       */
. /**********************************************************************************/
. 
. clear

. use estimation_file

. 
. 
. xtlogit executive  worldrulerl1   lastterm divided  v2xnp_pres communist     _spline1 _spline2 _spline3   , re

Fitting comparison model:

Iteration 0:   log likelihood = -4437.1533  
Iteration 1:   log likelihood =  -3506.531  
Iteration 2:   log likelihood = -3410.2812  
Iteration 3:   log likelihood = -3408.8986  
Iteration 4:   log likelihood =  -3408.896  
Iteration 5:   log likelihood =  -3408.896  

Fitting full model:

tau =  0.0     log likelihood =  -3408.896
tau =  0.1     log likelihood = -3351.6556
tau =  0.2     log likelihood = -3337.5566
tau =  0.3     log likelihood = -3336.8299
tau =  0.4     log likelihood = -3342.9665

Iteration 0:   log likelihood = -3336.9512  
Iteration 1:   log likelihood = -3311.8172  
Iteration 2:   log likelihood = -3311.1946  
Iteration 3:   log likelihood = -3311.1928  
Iteration 4:   log likelihood = -3311.1928  

Random-effects logistic regression              Number of obs     =      8,673
Group variable: ccode                           Number of groups  =        173

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          7
                                                              avg =       50.1
                                                              max =         72

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(8)      =    1312.31
Log likelihood  = -3311.1928                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0482107   .0020802    23.18   0.000     .0441336    .0522878
    lastterm |   .4888992   .1002197     4.88   0.000     .2924723    .6853262
     divided |   .1237343    .086336     1.43   0.152    -.0454812    .2929497
  v2xnp_pres |  -1.307961   .1922424    -6.80   0.000    -1.684749   -.9311728
   communist |  -.1807216   .2477075    -0.73   0.466    -.6662193    .3047761
    _spline1 |   .0248872   .0027871     8.93   0.000     .0194246    .0303497
    _spline2 |  -.0072585   .0008717    -8.33   0.000    -.0089669     -.00555
    _spline3 |   .0007857    .000118     6.66   0.000     .0005545    .0010169
       _cons |  -1.830911   .1322764   -13.84   0.000    -2.090168   -1.571654
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5437536   .1783398                     -.8932931    -.194214
-------------+----------------------------------------------------------------
     sigma_u |   .7619481   .0679428                        .63977    .9074589
         rho |        .15   .0227383                      .1106479    .2001973
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 195.41                 Prob >= chibar2 = 0.000

. est store m1

. xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist  loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re

Fitting comparison model:

Iteration 0:   log likelihood = -3211.9577  
Iteration 1:   log likelihood = -2651.8158  
Iteration 2:   log likelihood = -2572.1188  
Iteration 3:   log likelihood = -2570.9746  
Iteration 4:   log likelihood = -2570.9738  
Iteration 5:   log likelihood = -2570.9738  

Fitting full model:

tau =  0.0     log likelihood = -2570.9738
tau =  0.1     log likelihood = -2539.4727
tau =  0.2     log likelihood = -2532.9393
tau =  0.3     log likelihood = -2535.2635

Iteration 0:   log likelihood = -2532.9475  
Iteration 1:   log likelihood = -2518.4589  
Iteration 2:   log likelihood = -2518.1177  
Iteration 3:   log likelihood = -2518.1167  
Iteration 4:   log likelihood = -2518.1167  

Random-effects logistic regression              Number of obs     =      7,220
Group variable: ccode                           Number of groups  =        170

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          5
                                                              avg =       42.5
                                                              max =         62

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(14)     =     823.38
Log likelihood  = -2518.1167                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0558023   .0033514    16.65   0.000     .0492336    .0623709
     divided |   .1602812   .1010832     1.59   0.113    -.0378383    .3584006
    lastterm |    .507397   .1146049     4.43   0.000     .2827756    .7320184
  v2xnp_pres |  -1.057672   .2149383    -4.92   0.000    -1.478943   -.6364005
   communist |   -.262795   .2767529    -0.95   0.342    -.8052206    .2796307
  loggdpsize |  -.0489942   .0783302    -0.63   0.532    -.2025186    .1045302
  logdistcap |  -.3304448   .2784968    -1.19   0.235    -.8762885     .215399
   emergency |   .1290991   .0807273     1.60   0.110    -.0291235    .2873216
      member |   .0000313   .0080986     0.00   0.997    -.0158416    .0159043
       anniv |  -1.036684   .1243958    -8.33   0.000    -1.280495   -.7928727
 globalevent |    .064812   .1189715     0.54   0.586    -.1683678    .2979919
    _spline1 |   .0225965   .0031436     7.19   0.000     .0164351    .0287578
    _spline2 |  -.0064803   .0009862    -6.57   0.000    -.0084132   -.0045474
    _spline3 |   .0006642    .000135     4.92   0.000     .0003996    .0009289
       _cons |  -.4794951   1.189209    -0.40   0.687    -2.810303    1.851313
-------------+----------------------------------------------------------------
    /lnsig2u |  -.7245691   .2172782                     -1.150427   -.2987116
-------------+----------------------------------------------------------------
     sigma_u |   .6960843    .075622                      .5625848    .8612626
         rho |   .1283735   .0243121                      .0877619    .1839879
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 105.71                 Prob >= chibar2 = 0.000

. est store m2

. xtlogit executive  worldrulerl1  divided  lastterm  v2xnp_pres communist  loggdpsize logdistcap emergency  member  anniv   globalevent   _spline1 _spline2 _spline3   , fe
note: multiple positive outcomes within groups encountered.
note: 15 groups (579 obs) dropped because of all positive or
      all negative outcomes.
note: logdistcap omitted because of no within-group variance.

Iteration 0:   log likelihood = -2099.6412  
Iteration 1:   log likelihood = -2035.3205  
Iteration 2:   log likelihood = -2034.3712  
Iteration 3:   log likelihood = -2034.3707  
Iteration 4:   log likelihood = -2034.3707  

Conditional fixed-effects logistic regression   Number of obs     =      6,641
Group variable: ccode                           Number of groups  =        155

                                                Obs per group:
                                                              min =          5
                                                              avg =       42.8
                                                              max =         62

                                                LR chi2(13)       =     930.74
Log likelihood  = -2034.3707                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0445684   .0040588    10.98   0.000     .0366132    .0525236
     divided |   .1421921   .1114363     1.28   0.202     -.076219    .3606033
    lastterm |   .2551632   .1286026     1.98   0.047     .0031068    .5072196
  v2xnp_pres |  -1.522458   .3359183    -4.53   0.000    -2.180846   -.8640707
   communist |   .1953604   .3293247     0.59   0.553    -.4501042     .840825
  loggdpsize |    1.31323   .2448641     5.36   0.000     .8333052    1.793155
  logdistcap |          0  (omitted)
   emergency |   .0125932   .0823083     0.15   0.878    -.1487281    .1739145
      member |   .0154745   .0105215     1.47   0.141    -.0051473    .0360963
       anniv |  -1.052292   .1246342    -8.44   0.000    -1.296571   -.8080137
 globalevent |  -.0160614   .1189833    -0.13   0.893    -.2492644    .2171416
    _spline1 |   .0094109   .0032663     2.88   0.004     .0030091    .0158128
    _spline2 |   -.002304   .0010462    -2.20   0.028    -.0043546   -.0002534
    _spline3 |    .000066   .0001537     0.43   0.668    -.0002352    .0003672
------------------------------------------------------------------------------

. est store m3

.  xtgee executive  worldrulerl1  divided  lastterm  v2xnp_pres communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3, i(ccode) ///
>  t(year) corr(exchangeable) family(binomial) link(logit) vce(robust)

Iteration 1: tolerance = .05920173
Iteration 2: tolerance = .04698445
Iteration 3: tolerance = .01729911
Iteration 4: tolerance = .00433858
Iteration 5: tolerance = .00104234
Iteration 6: tolerance = .00025082
Iteration 7: tolerance = .00006048
Iteration 8: tolerance = .00001463
Iteration 9: tolerance = 3.546e-06
Iteration 10: tolerance = 8.600e-07

GEE population-averaged model                   Number of obs     =      7,220
Group variable:                      ccode      Number of groups  =        170
Link:                                logit      Obs per group:
Family:                           binomial                    min =          5
Correlation:                  exchangeable                    avg =       42.5
                                                              max =         62
                                                Wald chi2(14)     =     516.92
Scale parameter:                         1      Prob > chi2       =     0.0000

                                  (Std. Err. adjusted for clustering on ccode)
------------------------------------------------------------------------------
             |               Robust
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |    .051892   .0037193    13.95   0.000     .0446023    .0591817
     divided |   .1678133   .1013264     1.66   0.098    -.0307827    .3664093
    lastterm |   .5617849   .1203223     4.67   0.000     .3259575    .7976122
  v2xnp_pres |  -.9166465   .2160532    -4.24   0.000    -1.340103     -.49319
   communist |  -.4733836   .3627268    -1.31   0.192    -1.184315    .2375478
  loggdpsize |  -.0565117    .076818    -0.74   0.462    -.2070722    .0940488
  logdistcap |  -.3717577   .2948288    -1.26   0.207    -.9496115    .2060961
   emergency |   .1336146   .0843142     1.58   0.113    -.0316382    .2988674
      member |  -.0063715   .0075903    -0.84   0.401    -.0212483    .0085052
       anniv |  -.9540639   .1121573    -8.51   0.000    -1.173888   -.7342397
 globalevent |   .0695483   .1170538     0.59   0.552     -.159873    .2989696
    _spline1 |   .0257762   .0031595     8.16   0.000     .0195837    .0319687
    _spline2 |  -.0074937   .0009484    -7.90   0.000    -.0093525    -.005635
    _spline3 |    .000803    .000116     6.92   0.000     .0005757    .0010304
       _cons |  -.0511699   1.169904    -0.04   0.965    -2.344139      2.2418
------------------------------------------------------------------------------

.  est store m4

.  xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist  loggdpsize logdistcap emergency  member  anniv  globalevent post2000  _spline1 _spline2 _spline3, re

Fitting comparison model:

Iteration 0:   log likelihood = -3211.9577  
Iteration 1:   log likelihood = -2648.2542  
Iteration 2:   log likelihood = -2566.0682  
Iteration 3:   log likelihood = -2564.8287  
Iteration 4:   log likelihood = -2564.8279  
Iteration 5:   log likelihood = -2564.8279  

Fitting full model:

tau =  0.0     log likelihood = -2564.8279
tau =  0.1     log likelihood =  -2532.866
tau =  0.2     log likelihood = -2526.0768
tau =  0.3     log likelihood = -2528.2531

Iteration 0:   log likelihood = -2526.0858  
Iteration 1:   log likelihood = -2511.5349  
Iteration 2:   log likelihood = -2511.1878  
Iteration 3:   log likelihood = -2511.1868  
Iteration 4:   log likelihood = -2511.1868  

Random-effects logistic regression              Number of obs     =      7,220
Group variable: ccode                           Number of groups  =        170

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          5
                                                              avg =       42.5
                                                              max =         62

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(15)     =     838.52
Log likelihood  = -2511.1868                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0457923   .0042612    10.75   0.000     .0374405    .0541441
     divided |   .1458068   .1015386     1.44   0.151    -.0532052    .3448187
    lastterm |    .473316   .1150684     4.11   0.000     .2477861     .698846
  v2xnp_pres |  -1.067042   .2149091    -4.97   0.000    -1.488256   -.6458277
   communist |  -.2593085   .2776954    -0.93   0.350    -.8035816    .2849645
  loggdpsize |  -.0614792   .0782339    -0.79   0.432    -.2148149    .0918565
  logdistcap |  -.3799213   .2790988    -1.36   0.173    -.9269449    .1671023
   emergency |  -.0312936   .0919099    -0.34   0.733    -.2114336    .1488465
      member |  -.0049485    .008164    -0.61   0.544    -.0209496    .0110526
       anniv |  -1.096659   .1260581    -8.70   0.000    -1.343729     -.84959
 globalevent |  -.0443715   .1222373    -0.36   0.717    -.2839523    .1952093
    post2000 |   .4954417   .1330603     3.72   0.000     .2346484    .7562351
    _spline1 |   .0225499    .003145     7.17   0.000     .0163859     .028714
    _spline2 |  -.0064876   .0009865    -6.58   0.000    -.0084212   -.0045541
    _spline3 |   .0006716    .000135     4.97   0.000      .000407    .0009362
       _cons |    -.10983   1.193236    -0.09   0.927     -2.44853     2.22887
-------------+----------------------------------------------------------------
    /lnsig2u |  -.7218543   .2152198                     -1.143677   -.3000314
-------------+----------------------------------------------------------------
     sigma_u |   .6970298   .0750073                      .5644866    .8606945
         rho |   .1286776   .0241304                      .0883037    .1837899
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 107.28                 Prob >= chibar2 = 0.000

. est store m5

. xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist  loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, re

Fitting comparison model:

Iteration 0:   log likelihood = -1694.8379  
Iteration 1:   log likelihood = -1530.2373  
Iteration 2:   log likelihood = -1496.6422  
Iteration 3:   log likelihood = -1496.5669  
Iteration 4:   log likelihood = -1496.5668  

Fitting full model:

tau =  0.0     log likelihood = -1496.5668
tau =  0.1     log likelihood = -1477.6702
tau =  0.2     log likelihood = -1471.5043
tau =  0.3     log likelihood = -1471.2523
tau =  0.4     log likelihood = -1474.7268

Iteration 0:   log likelihood = -1471.2364  
Iteration 1:   log likelihood = -1456.2696  
Iteration 2:   log likelihood = -1455.7109  
Iteration 3:   log likelihood = -1455.7069  
Iteration 4:   log likelihood = -1455.7069  

Random-effects logistic regression              Number of obs     =      5,242
Group variable: ccode                           Number of groups  =        167

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          5
                                                              avg =       31.4
                                                              max =         50

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(14)     =     198.71
Log likelihood  = -1455.7069                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |    .059413   .0080595     7.37   0.000     .0436166    .0752094
     divided |  -.0156804   .1543036    -0.10   0.919    -.3181099     .286749
    lastterm |   .5353898   .1837217     2.91   0.004     .1753019    .8954778
  v2xnp_pres |  -1.179815   .2953049    -4.00   0.000    -1.758602   -.6010279
   communist |  -.0812358   .3081367    -0.26   0.792    -.6851726    .5227009
  loggdpsize |  -.2022509   .1074385    -1.88   0.060    -.4128265    .0083247
  logdistcap |  -.6719697   .3618849    -1.86   0.063    -1.381251    .0373117
   emergency |   .2186059   .1308268     1.67   0.095    -.0378099    .4750217
      member |   .0281101   .0219207     1.28   0.200    -.0148538    .0710739
       anniv |  -.3714576   .2068103    -1.80   0.072    -.7767984    .0338832
 globalevent |   .0902729   .1885259     0.48   0.632    -.2792311    .4597769
    _spline1 |   .0170318   .0043725     3.90   0.000     .0084618    .0256018
    _spline2 |  -.0047795    .001382    -3.46   0.001    -.0074881   -.0020708
    _spline3 |   .0004345   .0001954     2.22   0.026     .0000515    .0008175
       _cons |   .9957381   1.548462     0.64   0.520    -2.039192    4.030668
-------------+----------------------------------------------------------------
    /lnsig2u |  -.2601195   .2498329                     -.7497829     .229544
-------------+----------------------------------------------------------------
     sigma_u |    .878043    .109682                      .6873639    1.121618
         rho |   .1898528   .0384265                      .1255786    .2766173
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 81.72                  Prob >= chibar2 = 0.000

. est store m6

. xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, re

Fitting comparison model:

Iteration 0:   log likelihood = -1188.0835  
Iteration 1:   log likelihood = -1011.3941  
Iteration 2:   log likelihood = -1004.4591  
Iteration 3:   log likelihood = -1004.2206  
Iteration 4:   log likelihood = -1004.2196  
Iteration 5:   log likelihood = -1004.2196  

Fitting full model:

tau =  0.0     log likelihood = -1004.2196
tau =  0.1     log likelihood = -997.79506
tau =  0.2     log likelihood = -995.15995
tau =  0.3     log likelihood = -995.44878

Iteration 0:   log likelihood = -995.15994  
Iteration 1:   log likelihood = -991.65088  
Iteration 2:   log likelihood = -991.27537  
Iteration 3:   log likelihood = -991.27415  
Iteration 4:   log likelihood = -991.27415  

Random-effects logistic regression              Number of obs     =      1,819
Group variable: ccode                           Number of groups  =        169

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          5
                                                              avg =       10.8
                                                              max =         11

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(14)     =     174.01
Log likelihood  = -991.27415                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0334287   .0054832     6.10   0.000     .0226818    .0441755
     divided |   .3453055   .1638741     2.11   0.035     .0241182    .6664928
    lastterm |   .5220297     .15769     3.31   0.001     .2129629    .8310964
  v2xnp_pres |  -.7465066   .3143311    -2.37   0.018    -1.362584    -.130429
   communist |  -1.733897   .8531075    -2.03   0.042    -3.405957   -.0618374
  loggdpsize |  -.0005581   .0955586    -0.01   0.995    -.1878495    .1867332
  logdistcap |  -.3387967   .3579139    -0.95   0.344    -1.040295    .3627016
   emergency |  -.2554725   .1424239    -1.79   0.073    -.5346181    .0236731
      member |  -.0159116   .0099574    -1.60   0.110    -.0354277    .0036045
       anniv |  -1.158897   .1851395    -6.26   0.000    -1.521764   -.7960303
 globalevent |  -.2429096   .1647064    -1.47   0.140    -.5657282     .079909
    _spline1 |   .0167335   .0057693     2.90   0.004     .0054258    .0280412
    _spline2 |  -.0046336   .0018228    -2.54   0.011    -.0082062   -.0010609
    _spline3 |   .0004374   .0002538     1.72   0.085    -.0000601    .0009349
       _cons |   .5799471   1.535617     0.38   0.706    -2.429806      3.5897
-------------+----------------------------------------------------------------
    /lnsig2u |  -.6727499   .3171971                     -1.294445   -.0510551
-------------+----------------------------------------------------------------
     sigma_u |   .7143552   .1132957                      .5234978    .9747955
         rho |   .1342843   .0368748                      .0768957     .224105
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 25.89                  Prob >= chibar2 = 0.000

. est store m7

. xtlogit executive  worldrulerl1 divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , re

Fitting comparison model:

Iteration 0:   log likelihood = -2238.9446  
Iteration 1:   log likelihood = -1814.1194  
Iteration 2:   log likelihood = -1792.4216  
Iteration 3:   log likelihood = -1792.2521  
Iteration 4:   log likelihood = -1792.2521  

Fitting full model:

tau =  0.0     log likelihood = -1792.2521
tau =  0.1     log likelihood = -1754.8362
tau =  0.2     log likelihood = -1743.8377
tau =  0.3     log likelihood = -1741.3932
tau =  0.4     log likelihood = -1743.6459

Iteration 0:   log likelihood = -1741.5369  
Iteration 1:   log likelihood = -1727.8175  
Iteration 2:   log likelihood = -1727.6987  
Iteration 3:   log likelihood = -1727.6985  

Random-effects logistic regression              Number of obs     =      3,632
Group variable: ccode                           Number of groups  =        121

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       30.0
                                                              max =         72

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(6)      =     485.17
Log likelihood  = -1727.6985                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |    .046103   .0029893    15.42   0.000      .040244     .051962
     divided |   .2129276   .1276405     1.67   0.095    -.0372432    .4630985
    lastterm |   .4595312   .1357389     3.39   0.001     .1934879    .7255745
    _spline1 |   .0251956   .0040791     6.18   0.000     .0172008    .0331904
    _spline2 |  -.0072836    .001286    -5.66   0.000    -.0098041   -.0047632
    _spline3 |   .0007636   .0001785     4.28   0.000     .0004137    .0011134
       _cons |    -1.9736   .1514818   -13.03   0.000    -2.270499   -1.676702
-------------+----------------------------------------------------------------
    /lnsig2u |  -.4894557   .2149952                     -.9108385   -.0680729
-------------+----------------------------------------------------------------
     sigma_u |   .7829176   .0841618                       .634182    .9665363
         rho |   .1570553    .028463                      .1089331    .2211598
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 129.11                 Prob >= chibar2 = 0.000

. est store m8

. xtlogit executive  worldrulerl1 divided  lastterm   emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re

Fitting comparison model:

Iteration 0:   log likelihood = -1603.2797  
Iteration 1:   log likelihood = -1324.0675  
Iteration 2:   log likelihood = -1306.1947  
Iteration 3:   log likelihood = -1306.1104  
Iteration 4:   log likelihood = -1306.1104  

Fitting full model:

tau =  0.0     log likelihood = -1306.1104
tau =  0.1     log likelihood = -1282.4683
tau =  0.2     log likelihood = -1275.3377
tau =  0.3     log likelihood = -1274.2784
tau =  0.4     log likelihood = -1276.3408

Iteration 0:   log likelihood = -1274.2213  
Iteration 1:   log likelihood = -1263.4861  
Iteration 2:   log likelihood = -1263.2531  
Iteration 3:   log likelihood = -1263.2525  
Iteration 4:   log likelihood = -1263.2525  

Random-effects logistic regression              Number of obs     =      2,902
Group variable: ccode                           Number of groups  =        114

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       25.5
                                                              max =         62

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(12)     =     306.02
Log likelihood  = -1263.2525                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0540574   .0049259    10.97   0.000     .0444028     .063712
     divided |   .3185005   .1542532     2.06   0.039     .0161697    .6208313
    lastterm |    .498143   .1601093     3.11   0.002     .1843345    .8119514
   emergency |   .0951012   .1108568     0.86   0.391    -.1221741    .3123765
      member |   .0021728   .0095489     0.23   0.820    -.0165427    .0208883
  loggdpsize |   -.080307   .1049135    -0.77   0.444    -.2859338    .1253198
       anniv |  -1.484591   .1739943    -8.53   0.000    -1.825613   -1.143568
  logdistcap |  -.5249222   .3673017    -1.43   0.153     -1.24482    .1949758
 globalevent |   .0589025   .1667192     0.35   0.724    -.2678611    .3856662
    _spline1 |   .0214608   .0047451     4.52   0.000     .0121607     .030761
    _spline2 |  -.0062006    .001504    -4.12   0.000    -.0091483   -.0032529
    _spline3 |   .0006519   .0002128     3.06   0.002     .0002349    .0010689
       _cons |   .2625816   1.576798     0.17   0.868    -2.827885    3.353048
-------------+----------------------------------------------------------------
    /lnsig2u |  -.4257037    .259497                     -.9343085    .0829011
-------------+----------------------------------------------------------------
     sigma_u |   .8082759   .1048726                      .6267834    1.042322
         rho |   .1656811   .0358705                      .1066757    .2482539
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 85.72                  Prob >= chibar2 = 0.000

. est store m9

. xtlogit executive worldrulerl1 v2xnp_pres  communist   _spline1 _spline2 _spline3  if vdem==0, re

Fitting comparison model:

Iteration 0:   log likelihood = -2039.8515  
Iteration 1:   log likelihood = -1700.3489  
Iteration 2:   log likelihood = -1613.3264  
Iteration 3:   log likelihood = -1612.2052  
Iteration 4:   log likelihood = -1612.2022  
Iteration 5:   log likelihood = -1612.2022  

Fitting full model:

tau =  0.0     log likelihood = -1612.2022
tau =  0.1     log likelihood = -1591.6573
tau =  0.2     log likelihood = -1585.6518
tau =  0.3     log likelihood = -1585.6724

Iteration 0:   log likelihood = -1585.6527  
Iteration 1:   log likelihood = -1574.6589  
Iteration 2:   log likelihood = -1573.9467  
Iteration 3:   log likelihood = -1573.9411  
Iteration 4:   log likelihood = -1573.9411  

Random-effects logistic regression              Number of obs     =      5,190
Group variable: ccode                           Number of groups  =        141

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       36.8
                                                              max =         71

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(6)      =     557.68
Log likelihood  = -1573.9411                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0524555   .0031277    16.77   0.000     .0463253    .0585857
  v2xnp_pres |   -1.66666   .3137665    -5.31   0.000    -2.281631   -1.051689
   communist |  -.3012264   .2599196    -1.16   0.246    -.8106595    .2082067
    _spline1 |    .022187   .0039062     5.68   0.000      .014531     .029843
    _spline2 |  -.0065447   .0012124    -5.40   0.000    -.0089211   -.0041684
    _spline3 |   .0007363   .0001602     4.60   0.000     .0004223    .0010502
       _cons |  -1.654718   .2298212    -7.20   0.000    -2.105159   -1.204276
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5513779   .2455983                     -1.032742   -.0700141
-------------+----------------------------------------------------------------
     sigma_u |    .759049   .0932106                      .5966821    .9655986
         rho |   .1490305   .0311469                      .0976521    .2208256
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 76.52                  Prob >= chibar2 = 0.000

. est store m10

. xtlogit executive worldrulerl1 v2xnp_pres   emergency   logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re

Fitting comparison model:

Iteration 0:   log likelihood = -1492.3218  
Iteration 1:   log likelihood = -1301.7178  
Iteration 2:   log likelihood = -1233.3669  
Iteration 3:   log likelihood = -1232.6213  
Iteration 4:   log likelihood = -1232.6192  
Iteration 5:   log likelihood = -1232.6192  

Fitting full model:

tau =  0.0     log likelihood = -1232.6192
tau =  0.1     log likelihood = -1221.3758
tau =  0.2     log likelihood = -1218.2273
tau =  0.3     log likelihood = -1219.0543

Iteration 0:   log likelihood =  -1218.227  
Iteration 1:   log likelihood = -1210.2433  
Iteration 2:   log likelihood = -1209.6979  
Iteration 3:   log likelihood = -1209.6953  
Iteration 4:   log likelihood = -1209.6953  

Random-effects logistic regression              Number of obs     =      4,338
Group variable: ccode                           Number of groups  =        134

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       32.4
                                                              max =         61

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(12)     =     357.36
Log likelihood  = -1209.6953                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0520411   .0052362     9.94   0.000     .0417782    .0623039
  v2xnp_pres |  -1.555235   .3609455    -4.31   0.000    -2.262675   -.8477945
   emergency |   .1095163   .1243285     0.88   0.378    -.1341631    .3531958
  logdistcap |  -.7007159   .4599226    -1.52   0.128    -1.602148    .2007157
      member |   .0937764   .0288002     3.26   0.001     .0373291    .1502237
  loggdpsize |  -.0304254   .1149552    -0.26   0.791    -.2557334    .1948825
       anniv |  -.5508843   .1811702    -3.04   0.002    -.9059713   -.1957973
   communist |  -.5023057   .3272813    -1.53   0.125    -1.143765    .1391539
 globalevent |  -.0351283   .1781917    -0.20   0.844    -.3843776     .314121
    _spline1 |   .0185712   .0044121     4.21   0.000     .0099237    .0272187
    _spline2 |  -.0053189   .0013743    -3.87   0.000    -.0080125   -.0026252
    _spline3 |   .0005413   .0001844     2.94   0.003     .0001798    .0009027
       _cons |   .6138838   1.879378     0.33   0.744    -3.069629    4.297397
-------------+----------------------------------------------------------------
    /lnsig2u |   -.537728    .292111                     -1.110255    .0347991
-------------+----------------------------------------------------------------
     sigma_u |   .7642472   .1116225                      .5739991    1.017552
         rho |   .1507699   .0374014                      .0910317    .2393861
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 45.85                  Prob >= chibar2 = 0.000

. est store m11

. xtlogit executive  logpop log10income worldrulerl1  divided  lastterm  v2xnp_pres communist   _spline1 _spline2 _spline3   , re

Fitting comparison model:

Iteration 0:   log likelihood = -3768.3308  
Iteration 1:   log likelihood = -3037.1683  
Iteration 2:   log likelihood = -2978.0719  
Iteration 3:   log likelihood = -2977.4962  
Iteration 4:   log likelihood = -2977.4956  
Iteration 5:   log likelihood = -2977.4956  

Fitting full model:

tau =  0.0     log likelihood = -2977.4956
tau =  0.1     log likelihood = -2927.7981
tau =  0.2     log likelihood = -2915.4834
tau =  0.3     log likelihood = -2915.3001
tau =  0.4     log likelihood = -2920.8815

Iteration 0:   log likelihood = -2915.3008  
Iteration 1:   log likelihood = -2890.8784  
Iteration 2:   log likelihood = -2890.2165  
Iteration 3:   log likelihood =  -2890.214  
Iteration 4:   log likelihood =  -2890.214  

Random-effects logistic regression              Number of obs     =      6,943
Group variable: ccode                           Number of groups  =        166

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =         11
                                                              avg =       41.8
                                                              max =         58

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(10)     =     981.54
Log likelihood  =  -2890.214                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      logpop |   .1765601   .0981291     1.80   0.072    -.0157694    .3688896
 log10income |  -.2658018   .1147281    -2.32   0.021    -.4906647   -.0409389
worldrulerl1 |    .046726   .0024213    19.30   0.000     .0419803    .0514717
     divided |   .0740958   .0941395     0.79   0.431    -.1104142    .2586058
    lastterm |   .4680009   .1057841     4.42   0.000     .2606679    .6753339
  v2xnp_pres |  -1.444188   .2225428    -6.49   0.000    -1.880364   -1.008012
   communist |   .1610856   .3588904     0.45   0.654    -.5423266    .8644978
    _spline1 |   .0215493   .0030273     7.12   0.000      .015616    .0274827
    _spline2 |  -.0061645   .0009464    -6.51   0.000    -.0080195   -.0043095
    _spline3 |   .0006258    .000128     4.89   0.000      .000375    .0008766
       _cons |  -1.991825   .8238645    -2.42   0.016     -3.60657   -.3770807
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5028823     .18924                      -.873786   -.1319787
-------------+----------------------------------------------------------------
     sigma_u |   .7776792    .073584                      .6460406    .9361408
         rho |    .155286    .024823                      .1125821    .2103485
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 174.56                 Prob >= chibar2 = 0.000

. est store m12                    

. xtlogit executive  intercareer minforeign foreignedu leaderage worldrulerl1 log10income divided  lastterm  v2xnp_pres communist   _spline1 _spline2 _spline3   , re

Fitting comparison model:

Iteration 0:   log likelihood =   -3132.97  
Iteration 1:   log likelihood = -2588.1539  
Iteration 2:   log likelihood = -2538.4004  
Iteration 3:   log likelihood = -2537.9337  
Iteration 4:   log likelihood = -2537.9335  

Fitting full model:

tau =  0.0     log likelihood = -2537.9335
tau =  0.1     log likelihood = -2498.9772
tau =  0.2     log likelihood = -2489.8112
tau =  0.3     log likelihood = -2490.5947

Iteration 0:   log likelihood = -2489.8238  
Iteration 1:   log likelihood = -2469.1285  
Iteration 2:   log likelihood = -2468.2499  
Iteration 3:   log likelihood = -2468.2411  
Iteration 4:   log likelihood = -2468.2411  

Random-effects logistic regression              Number of obs     =      6,213
Group variable: ccode                           Number of groups  =        160

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          3
                                                              avg =       38.8
                                                              max =         58

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(13)     =     739.62
Log likelihood  = -2468.2411                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
 intercareer |   .6232569   .2825107     2.21   0.027     .0695461    1.176968
  minforeign |   .2267392   .2414879     0.94   0.348    -.2465685    .7000468
  foreignedu |   .1027848   .0927102     1.11   0.268    -.0789238    .2844935
   leaderage |  -.0086676   .0041793    -2.07   0.038    -.0168588   -.0004764
worldrulerl1 |   .0461747   .0028069    16.45   0.000     .0406732    .0516762
 log10income |  -.2130769   .1206243    -1.77   0.077    -.4494961    .0233423
     divided |   .1075061   .1023353     1.05   0.293    -.0930673    .3080795
    lastterm |   .5688857   .1105673     5.15   0.000     .3521777    .7855936
  v2xnp_pres |  -1.317672   .2361265    -5.58   0.000    -1.780472   -.8548727
   communist |   .2113028   .3608523     0.59   0.558    -.4959547    .9185604
    _spline1 |   .0194774   .0032459     6.00   0.000     .0131155    .0258392
    _spline2 |  -.0054913   .0010213    -5.38   0.000     -.007493   -.0034895
    _spline3 |   .0005263   .0001411     3.73   0.000     .0002499    .0008028
       _cons |  -.6462004   .5298361    -1.22   0.223     -1.68466    .3922592
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5441308   .2033964                     -.9427803   -.1454812
-------------+----------------------------------------------------------------
     sigma_u |   .7618045   .0774741                       .624134     .929842
         rho |   .1499519   .0259262                      .1058711    .2081145
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 139.38                 Prob >= chibar2 = 0.000

. est store m13                                           

. xtlogit executive  anywar  e_migdpgro  worldrulerl1  divided  lastterm  log10income v2xnp_pres communist    _spline1 _spline2 _spline3   , re

Fitting comparison model:

Iteration 0:   log likelihood = -3198.6124  
Iteration 1:   log likelihood = -2568.1408  
Iteration 2:   log likelihood = -2513.6697  
Iteration 3:   log likelihood = -2513.1489  
Iteration 4:   log likelihood = -2513.1486  
Iteration 5:   log likelihood = -2513.1486  

Fitting full model:

tau =  0.0     log likelihood = -2513.1486
tau =  0.1     log likelihood = -2475.1176
tau =  0.2     log likelihood = -2465.9457
tau =  0.3     log likelihood = -2466.5344

Iteration 0:   log likelihood = -2465.9526  
Iteration 1:   log likelihood = -2448.3247  
Iteration 2:   log likelihood = -2447.6777  
Iteration 3:   log likelihood = -2447.6747  
Iteration 4:   log likelihood = -2447.6747  

Random-effects logistic regression              Number of obs     =      6,063
Group variable: ccode                           Number of groups  =        148

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =         10
                                                              avg =       41.0
                                                              max =         57

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(11)     =     856.85
Log likelihood  = -2447.6747                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      anywar |   .1446492   .1252616     1.15   0.248     -.100859    .3901574
  e_migdpgro |  -.7668157   .4682932    -1.64   0.102    -1.684653    .1510221
worldrulerl1 |   .0482719    .002667    18.10   0.000     .0430446    .0534992
     divided |  -.0030324   .1013439    -0.03   0.976    -.2016629     .195598
    lastterm |   .5454416   .1125679     4.85   0.000     .3248126    .7660707
 log10income |  -.3337335   .1186817    -2.81   0.005    -.5663454   -.1011216
  v2xnp_pres |  -1.459808   .2388931    -6.11   0.000     -1.92803   -.9915864
   communist |   .2744169   .3680531     0.75   0.456    -.4469541    .9957878
    _spline1 |   .0225449   .0032755     6.88   0.000     .0161249    .0289648
    _spline2 |  -.0064584   .0010224    -6.32   0.000    -.0084623   -.0044545
    _spline3 |   .0006585   .0001374     4.79   0.000     .0003891    .0009279
       _cons |  -.5807139   .4749203    -1.22   0.221    -1.511541    .3501128
-------------+----------------------------------------------------------------
    /lnsig2u |   -.608219   .2045169                     -1.009065   -.2073732
-------------+----------------------------------------------------------------
     sigma_u |   .7377801   .0754443                      .6037878    .9015078
         rho |   .1419647   .0249124                      .0997584    .1980986
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 130.95                 Prob >= chibar2 = 0.000

. est store m14

. estout  m1 m2  m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
> label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 

                    &          m1   &          m2   &          m3   &          m4   &          m5   &          m6   &          m7   &          m8   &          m9   &         m10   &         m11   &         m12   &         m13   &         m14   \\
                    &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   \\
main                &               &               &               &               &               &               &               &               &               &               &               &               &               &               \\
World leaders, t-1  &       0.048***&       0.056***&       0.045***&       0.052***&       0.046***&       0.059***&       0.033***&       0.046***&       0.054***&       0.052***&       0.052***&       0.047***&       0.046***&       0.048***\\
                    &     (0.002)   &     (0.003)   &     (0.004)   &     (0.004)   &     (0.004)   &     (0.008)   &     (0.005)   &     (0.003)   &     (0.005)   &     (0.003)   &     (0.005)   &     (0.002)   &     (0.003)   &     (0.003)   \\
Lame duck           &       0.489***&       0.507***&       0.255** &       0.562***&       0.473***&       0.535** &       0.522***&       0.460***&       0.498** &               &               &       0.468***&       0.569***&       0.545***\\
                    &     (0.100)   &     (0.115)   &     (0.129)   &     (0.120)   &     (0.115)   &     (0.184)   &     (0.158)   &     (0.136)   &     (0.160)   &               &               &     (0.106)   &     (0.111)   &     (0.113)   \\
Divided government  &       0.124   &       0.160   &       0.142   &       0.168+  &       0.146   &      -0.016   &       0.345** &       0.213+  &       0.319** &               &               &       0.074   &       0.108   &      -0.003   \\
                    &     (0.086)   &     (0.101)   &     (0.111)   &     (0.101)   &     (0.102)   &     (0.154)   &     (0.164)   &     (0.128)   &     (0.154)   &               &               &     (0.094)   &     (0.102)   &     (0.101)   \\
Power concentration &      -1.308***&      -1.058***&      -1.522***&      -0.917***&      -1.067***&      -1.180***&      -0.747** &               &               &      -1.667***&      -1.555***&      -1.444***&      -1.318***&      -1.460***\\
                    &     (0.192)   &     (0.215)   &     (0.336)   &     (0.216)   &     (0.215)   &     (0.295)   &     (0.314)   &               &               &     (0.314)   &     (0.361)   &     (0.223)   &     (0.236)   &     (0.239)   \\
Communist regime    &      -0.181   &      -0.263   &       0.195   &      -0.473   &      -0.259   &      -0.081   &      -1.734** &               &               &      -0.301   &      -0.502   &       0.161   &       0.211   &       0.274   \\
                    &     (0.248)   &     (0.277)   &     (0.329)   &     (0.363)   &     (0.278)   &     (0.308)   &     (0.853)   &               &               &     (0.260)   &     (0.327)   &     (0.359)   &     (0.361)   &     (0.368)   \\
(spline-k1) cubed   &       0.025***&       0.023***&       0.009** &       0.026***&       0.023***&       0.017***&       0.017** &       0.025***&       0.021***&       0.022***&       0.019***&       0.022***&       0.019***&       0.023***\\
                    &     (0.003)   &     (0.003)   &     (0.003)   &     (0.003)   &     (0.003)   &     (0.004)   &     (0.006)   &     (0.004)   &     (0.005)   &     (0.004)   &     (0.004)   &     (0.003)   &     (0.003)   &     (0.003)   \\
(spline-k2) cubed   &      -0.007***&      -0.006***&      -0.002** &      -0.007***&      -0.006***&      -0.005***&      -0.005** &      -0.007***&      -0.006***&      -0.007***&      -0.005***&      -0.006***&      -0.005***&      -0.006***\\
                    &     (0.001)   &     (0.001)   &     (0.001)   &     (0.001)   &     (0.001)   &     (0.001)   &     (0.002)   &     (0.001)   &     (0.002)   &     (0.001)   &     (0.001)   &     (0.001)   &     (0.001)   &     (0.001)   \\
(spline-k3) cubed   &       0.001***&       0.001***&       0.000   &       0.001***&       0.001***&       0.000** &       0.000+  &       0.001***&       0.001** &       0.001***&       0.001** &       0.001***&       0.001***&       0.001***\\
                    &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   &     (0.000)   \\
GDP, log            &               &      -0.049   &       1.313***&      -0.057   &      -0.061   &      -0.202+  &      -0.001   &               &      -0.080   &               &      -0.030   &               &               &               \\
                    &               &     (0.078)   &     (0.245)   &     (0.077)   &     (0.078)   &     (0.107)   &     (0.096)   &               &     (0.105)   &               &     (0.115)   &               &               &               \\
Geographic distance &               &      -0.330   &       0.000   &      -0.372   &      -0.380   &      -0.672+  &      -0.339   &               &      -0.525   &               &      -0.701   &               &               &               \\
                    &               &     (0.278)   &         (.)   &     (0.295)   &     (0.279)   &     (0.362)   &     (0.358)   &               &     (0.367)   &               &     (0.460)   &               &               &               \\
Emergency session year&               &       0.129   &       0.013   &       0.134   &      -0.031   &       0.219+  &      -0.255+  &               &       0.095   &               &       0.110   &               &               &               \\
                    &               &     (0.081)   &     (0.082)   &     (0.084)   &     (0.092)   &     (0.131)   &     (0.142)   &               &     (0.111)   &               &     (0.124)   &               &               &               \\
IO membership       &               &       0.000   &       0.015   &      -0.006   &      -0.005   &       0.028   &      -0.016   &               &       0.002   &               &       0.094** &               &               &               \\
                    &               &     (0.008)   &     (0.011)   &     (0.008)   &     (0.008)   &     (0.022)   &     (0.010)   &               &     (0.010)   &               &     (0.029)   &               &               &               \\
Anniversary year    &               &      -1.037***&      -1.052***&      -0.954***&      -1.097***&      -0.371+  &      -1.159***&               &      -1.485***&               &      -0.551** &               &               &               \\
                    &               &     (0.124)   &     (0.125)   &     (0.112)   &     (0.126)   &     (0.207)   &     (0.185)   &               &     (0.174)   &               &     (0.181)   &               &               &               \\
Global event        &               &       0.065   &      -0.016   &       0.070   &      -0.044   &       0.090   &      -0.243   &               &       0.059   &               &      -0.035   &               &               &               \\
                    &               &     (0.119)   &     (0.119)   &     (0.117)   &     (0.122)   &     (0.189)   &     (0.165)   &               &     (0.167)   &               &     (0.178)   &               &               &               \\
Post Millenium Summit&               &               &               &               &       0.495***&               &               &               &               &               &               &               &               &               \\
                    &               &               &               &               &     (0.133)   &               &               &               &               &               &               &               &               &               \\
Population size (logged)&               &               &               &               &               &               &               &               &               &               &               &       0.177+  &               &               \\
                    &               &               &               &               &               &               &               &               &               &               &               &     (0.098)   &               &               \\
GDP per capita, logged&               &               &               &               &               &               &               &               &               &               &               &      -0.266** &      -0.213+  &      -0.334** \\
                    &               &               &               &               &               &               &               &               &               &               &               &     (0.115)   &     (0.121)   &     (0.119)   \\
Prior international career&               &               &               &               &               &               &               &               &               &               &               &               &       0.623** &               \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &     (0.283)   &               \\
ex MFA              &               &               &               &               &               &               &               &               &               &               &               &               &       0.227   &               \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &     (0.241)   &               \\
Education abroad    &               &               &               &               &               &               &               &               &               &               &               &               &       0.103   &               \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &     (0.093)   &               \\
Leader’s age        &               &               &               &               &               &               &               &               &               &               &               &               &      -0.009** &               \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &     (0.004)   &               \\
Military conflict   &               &               &               &               &               &               &               &               &               &               &               &               &               &       0.145   \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &               &     (0.125)   \\
GDP growth          &               &               &               &               &               &               &               &               &               &               &               &               &               &      -0.767   \\
                    &               &               &               &               &               &               &               &               &               &               &               &               &               &     (0.468)   \\
Constant            &      -1.831***&      -0.479   &               &      -0.051   &      -0.110   &       0.996   &       0.580   &      -1.974***&       0.263   &      -1.655***&       0.614   &      -1.992** &      -0.646   &      -0.581   \\
                    &     (0.132)   &     (1.189)   &               &     (1.170)   &     (1.193)   &     (1.548)   &     (1.536)   &     (0.151)   &     (1.577)   &     (0.230)   &     (1.879)   &     (0.824)   &     (0.530)   &     (0.475)   \\
/                   &               &               &               &               &               &               &               &               &               &               &               &               &               &               \\
lnsig2u             &      -0.544** &      -0.725***&               &               &      -0.722***&      -0.260   &      -0.673** &      -0.489** &      -0.426   &      -0.551** &      -0.538+  &      -0.503** &      -0.544** &      -0.608** \\
                    &     (0.178)   &     (0.217)   &               &               &     (0.215)   &     (0.250)   &     (0.317)   &     (0.215)   &     (0.259)   &     (0.246)   &     (0.292)   &     (0.189)   &     (0.203)   &     (0.205)   \\
N                   &        8673   &        7220   &        6641   &        7220   &        7220   &        5242   &        1819   &        3632   &        2902   &        5190   &        4338   &        6943   &        6213   &        6063   \\
Ncountries          &         173   &         170   &         155   &         170   &         170   &         167   &         169   &         121   &         114   &         141   &         134   &         166   &         160   &         148   \\
Log-likelihood      &    -3311.19   &    -2518.12   &    -2034.37   &               &    -2511.19   &    -1455.71   &     -991.27   &    -1727.70   &    -1263.25   &    -1573.94   &    -1209.70   &    -2890.21   &    -2468.24   &    -2447.67   \\
chi2                &    1312.308   &     823.378   &     930.739   &     516.920   &     838.523   &     198.713   &     174.013   &     485.168   &     306.024   &     557.676   &     357.364   &     981.535   &     739.623   &     856.846   \\
sigma_u             &       0.762   &       0.696   &               &               &       0.697   &       0.878   &       0.714   &       0.783   &       0.808   &       0.759   &       0.764   &       0.778   &       0.762   &       0.738   \\
rho                 &       0.150   &       0.128   &               &               &       0.129   &       0.190   &       0.134   &       0.157   &       0.166   &       0.149   &       0.151   &       0.155   &       0.150   &       0.142   \\
+ p<0.10, ** p<0.05, *** p<0.001

. 
. 
. 
. /**********************************************************************************/
. /* Figure 3  top  */
. /**********************************************************************************/
. 
. 
. clear

. use estimation_file              

. gen pipe = "|"

. gen where = .001

.                          
. xtlogit executive  c.worldrulerl1  divided  lastterm v2xnp_pres    loggdpsize logdistcap emergency  member  anniv      communist globalevent  _spline1 _spline2 _spline3   , re

Fitting comparison model:

Iteration 0:   log likelihood = -3211.9577  
Iteration 1:   log likelihood = -2651.8158  
Iteration 2:   log likelihood = -2572.1188  
Iteration 3:   log likelihood = -2570.9746  
Iteration 4:   log likelihood = -2570.9738  
Iteration 5:   log likelihood = -2570.9738  

Fitting full model:

tau =  0.0     log likelihood = -2570.9738
tau =  0.1     log likelihood = -2539.4727
tau =  0.2     log likelihood = -2532.9393
tau =  0.3     log likelihood = -2535.2635

Iteration 0:   log likelihood = -2532.9475  
Iteration 1:   log likelihood = -2518.4589  
Iteration 2:   log likelihood = -2518.1177  
Iteration 3:   log likelihood = -2518.1167  
Iteration 4:   log likelihood = -2518.1167  

Random-effects logistic regression              Number of obs     =      7,220
Group variable: ccode                           Number of groups  =        170

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          5
                                                              avg =       42.5
                                                              max =         62

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(14)     =     823.38
Log likelihood  = -2518.1167                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0558023   .0033514    16.65   0.000     .0492336    .0623709
     divided |   .1602812   .1010832     1.59   0.113    -.0378383    .3584006
    lastterm |    .507397   .1146049     4.43   0.000     .2827756    .7320184
  v2xnp_pres |  -1.057672   .2149383    -4.92   0.000    -1.478943   -.6364005
  loggdpsize |  -.0489942   .0783302    -0.63   0.532    -.2025186    .1045302
  logdistcap |  -.3304448   .2784968    -1.19   0.235    -.8762885     .215399
   emergency |   .1290991   .0807273     1.60   0.110    -.0291235    .2873216
      member |   .0000313   .0080986     0.00   0.997    -.0158416    .0159043
       anniv |  -1.036684   .1243958    -8.33   0.000    -1.280495   -.7928727
   communist |   -.262795   .2767529    -0.95   0.342    -.8052206    .2796307
 globalevent |    .064812   .1189715     0.54   0.586    -.1683678    .2979919
    _spline1 |   .0225965   .0031436     7.19   0.000     .0164351    .0287578
    _spline2 |  -.0064803   .0009862    -6.57   0.000    -.0084132   -.0045474
    _spline3 |   .0006642    .000135     4.92   0.000     .0003996    .0009289
       _cons |  -.4794951   1.189209    -0.40   0.687    -2.810303    1.851313
-------------+----------------------------------------------------------------
    /lnsig2u |  -.7245691   .2172782                     -1.150427   -.2987116
-------------+----------------------------------------------------------------
     sigma_u |   .6960843    .075622                      .5625848    .8612626
         rho |   .1283735   .0243121                      .0877619    .1839879
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 105.71                 Prob >= chibar2 = 0.000

. 
. margins, at(worldruler=(5(5)60)) 

Predictive margins                              Number of obs     =      7,220
Model VCE    : OIM

Expression   : Pr(executive=1), predict(pr)

1._at        : worldrulerl1    =           5

2._at        : worldrulerl1    =          10

3._at        : worldrulerl1    =          15

4._at        : worldrulerl1    =          20

5._at        : worldrulerl1    =          25

6._at        : worldrulerl1    =          30

7._at        : worldrulerl1    =          35

8._at        : worldrulerl1    =          40

9._at        : worldrulerl1    =          45

10._at       : worldrulerl1    =          50

11._at       : worldrulerl1    =          55

12._at       : worldrulerl1    =          60

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .0850914   .0062218    13.68   0.000     .0728969    .0972859
          2  |   .1069519   .0067362    15.88   0.000     .0937493    .1201546
          3  |   .1331657   .0073772    18.05   0.000     .1187067    .1476248
          4  |   .1640921   .0083286    19.70   0.000     .1477684    .1804157
          5  |   .1999419   .0097943    20.41   0.000     .1807455    .2191384
          6  |    .240726   .0119041    20.22   0.000     .2173945    .2640576
          7  |    .286213   .0146529    19.53   0.000     .2574939    .3149321
          8  |   .3359051   .0179099    18.76   0.000     .3008024    .3710077
          9  |   .3890394   .0214569    18.13   0.000     .3469846    .4310942
         10  |   .4446173   .0250258    17.77   0.000     .3955677    .4936669
         11  |   .5014619   .0283309    17.70   0.000     .4459342    .5569895
         12  |   .5582989   .0311029    17.95   0.000     .4973383    .6192595
------------------------------------------------------------------------------

. 
. 
. marginsplot, recast(line) recastci(rcap) ///
> ylab( 0 "0" .2 "20" .4 "40" .6 "60" .8 "80"  , labsize(small) angle(360))   ysize(4) xsize(5) scheme(s1mono) ///
>              ytitle("Probability of individual attendance", size(small)) plotregion(margin(t-10)) ///
>                          xlab(10 "10" 25 "25" 40 "45" 55 "55"  , labsize(small)) plotregion(margin(t-10))  ///
>                          xtitle("Percentage of world leaders attending last year", size(small)) title("All leaders", size(medsmall ))   ///
>                          addplot((scatter where worldrulerl1,  ///
>                          xlab() msymbol(none) mlabel(pipe) mlabposition(0)), below) legend(off)

  Variables that uniquely identify margins: worldrulerl1

. graph export output/margins_all.pdf, replace             
(file /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/margins_all.pdf written in PDF format)

.                          
. /* estimate to discuss in text */                        
. xtlogit executive worldrulerl1 v2xnp_pres  communist   _spline1 _spline2 _spline3  if vdem==0, re

Fitting comparison model:

Iteration 0:   log likelihood = -2039.8515  
Iteration 1:   log likelihood = -1700.3489  
Iteration 2:   log likelihood = -1613.3264  
Iteration 3:   log likelihood = -1612.2052  
Iteration 4:   log likelihood = -1612.2022  
Iteration 5:   log likelihood = -1612.2022  

Fitting full model:

tau =  0.0     log likelihood = -1612.2022
tau =  0.1     log likelihood = -1591.6573
tau =  0.2     log likelihood = -1585.6518
tau =  0.3     log likelihood = -1585.6724

Iteration 0:   log likelihood = -1585.6527  
Iteration 1:   log likelihood = -1574.6589  
Iteration 2:   log likelihood = -1573.9467  
Iteration 3:   log likelihood = -1573.9411  
Iteration 4:   log likelihood = -1573.9411  

Random-effects logistic regression              Number of obs     =      5,190
Group variable: ccode                           Number of groups  =        141

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       36.8
                                                              max =         71

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(6)      =     557.68
Log likelihood  = -1573.9411                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0524555   .0031277    16.77   0.000     .0463253    .0585857
  v2xnp_pres |   -1.66666   .3137665    -5.31   0.000    -2.281631   -1.051689
   communist |  -.3012264   .2599196    -1.16   0.246    -.8106595    .2082067
    _spline1 |    .022187   .0039062     5.68   0.000      .014531     .029843
    _spline2 |  -.0065447   .0012124    -5.40   0.000    -.0089211   -.0041684
    _spline3 |   .0007363   .0001602     4.60   0.000     .0004223    .0010502
       _cons |  -1.654718   .2298212    -7.20   0.000    -2.105159   -1.204276
-------------+----------------------------------------------------------------
    /lnsig2u |  -.5513779   .2455983                     -1.032742   -.0700141
-------------+----------------------------------------------------------------
     sigma_u |    .759049   .0932106                      .5966821    .9655986
         rho |   .1490305   .0311469                      .0976521    .2208256
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 76.52                  Prob >= chibar2 = 0.000

. margins , at(v2xnp_pres=(0 0.5 1)) grand atmeans predict(pr)    

Adjusted predictions                            Number of obs     =      5,190
Model VCE    : OIM

Expression   : Pr(executive=1), predict(pr)

1._at        : worldrulerl1    =    16.71512 (mean)
               v2xnp_pres      =           0
               communist       =    .1350674 (mean)
               _spline1        =   -795.0724 (mean)
               _spline2        =    -3322.63 (mean)
               _spline3        =   -6357.215 (mean)

2._at        : worldrulerl1    =    16.71512 (mean)
               v2xnp_pres      =          .5
               communist       =    .1350674 (mean)
               _spline1        =   -795.0724 (mean)
               _spline2        =    -3322.63 (mean)
               _spline3        =   -6357.215 (mean)

3._at        : worldrulerl1    =    16.71512 (mean)
               v2xnp_pres      =           1
               communist       =    .1350674 (mean)
               _spline1        =   -795.0724 (mean)
               _spline2        =    -3322.63 (mean)
               _spline3        =   -6357.215 (mean)

------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |    .223132   .0353445     6.31   0.000      .153858     .292406
          2  |   .1172326   .0103081    11.37   0.000     .0970292     .137436
          3  |   .0566147   .0073038     7.75   0.000     .0422995    .0709298
------------------------------------------------------------------------------

.                 
.         
. //*************************************************************//
. ///******  Figure 3 left bottom  **************///
> //*************************************************************//
. 
. 
. 
. clear

. use estimation_file

. xtlogit executive  worldrulerl1 divided  lastterm   emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re

Fitting comparison model:

Iteration 0:   log likelihood = -1603.2797  
Iteration 1:   log likelihood = -1324.0675  
Iteration 2:   log likelihood = -1306.1947  
Iteration 3:   log likelihood = -1306.1104  
Iteration 4:   log likelihood = -1306.1104  

Fitting full model:

tau =  0.0     log likelihood = -1306.1104
tau =  0.1     log likelihood = -1282.4683
tau =  0.2     log likelihood = -1275.3377
tau =  0.3     log likelihood = -1274.2784
tau =  0.4     log likelihood = -1276.3408

Iteration 0:   log likelihood = -1274.2213  
Iteration 1:   log likelihood = -1263.4861  
Iteration 2:   log likelihood = -1263.2531  
Iteration 3:   log likelihood = -1263.2525  
Iteration 4:   log likelihood = -1263.2525  

Random-effects logistic regression              Number of obs     =      2,902
Group variable: ccode                           Number of groups  =        114

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       25.5
                                                              max =         62

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(12)     =     306.02
Log likelihood  = -1263.2525                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0540574   .0049259    10.97   0.000     .0444028     .063712
     divided |   .3185005   .1542532     2.06   0.039     .0161697    .6208313
    lastterm |    .498143   .1601093     3.11   0.002     .1843345    .8119514
   emergency |   .0951012   .1108568     0.86   0.391    -.1221741    .3123765
      member |   .0021728   .0095489     0.23   0.820    -.0165427    .0208883
  loggdpsize |   -.080307   .1049135    -0.77   0.444    -.2859338    .1253198
       anniv |  -1.484591   .1739943    -8.53   0.000    -1.825613   -1.143568
  logdistcap |  -.5249222   .3673017    -1.43   0.153     -1.24482    .1949758
 globalevent |   .0589025   .1667192     0.35   0.724    -.2678611    .3856662
    _spline1 |   .0214608   .0047451     4.52   0.000     .0121607     .030761
    _spline2 |  -.0062006    .001504    -4.12   0.000    -.0091483   -.0032529
    _spline3 |   .0006519   .0002128     3.06   0.002     .0002349    .0010689
       _cons |   .2625816   1.576798     0.17   0.868    -2.827885    3.353048
-------------+----------------------------------------------------------------
    /lnsig2u |  -.4257037    .259497                     -.9343085    .0829011
-------------+----------------------------------------------------------------
     sigma_u |   .8082759   .1048726                      .6267834    1.042322
         rho |   .1656811   .0358705                      .1066757    .2482539
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 85.72                  Prob >= chibar2 = 0.000

. margins, dydx(*)  post

Average marginal effects                        Number of obs     =      2,902
Model VCE    : OIM

Expression   : Pr(executive=1), predict(pr)
dy/dx w.r.t. : worldrulerl1 divided lastterm emergency member loggdpsize anniv logdistcap globalevent _spline1 _spline2 _spline3

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0074419   .0006391    11.65   0.000     .0061894    .0086944
     divided |    .043847   .0210958     2.08   0.038     .0025001    .0851939
    lastterm |   .0685778   .0218523     3.14   0.002     .0257481    .1114075
   emergency |   .0130923   .0152462     0.86   0.390    -.0167898    .0429743
      member |   .0002991   .0013148     0.23   0.820    -.0022778    .0028761
  loggdpsize |  -.0110556   .0143831    -0.77   0.442     -.039246    .0171348
       anniv |   -.204379   .0238103    -8.58   0.000    -.2510464   -.1577116
  logdistcap |  -.0722644   .0506716    -1.43   0.154     -.171579    .0270502
 globalevent |   .0081089   .0229485     0.35   0.724    -.0368692    .0530871
    _spline1 |   .0029544   .0006575     4.49   0.000     .0016658    .0042431
    _spline2 |  -.0008536   .0002083    -4.10   0.000     -.001262   -.0004453
    _spline3 |   .0000897   .0000294     3.06   0.002     .0000322    .0001473
------------------------------------------------------------------------------

. parmest, saving(output/m1, replace) 
file output/m1.dta saved

. clear

. use output/m1

. drop in 10/12
(3 observations deleted)

. ren parm vars

. 
. replace vars="Emergency session year" if vars=="emergency"
variable vars was str12 now str22
(1 real change made)

. replace vars="Lame duck" if vars=="lastterm"
(1 real change made)

. replace vars="GDP, log" if vars=="loggdpsize"
(1 real change made)

. replace vars="Divided government" if vars=="divided"
(1 real change made)

. replace vars="IO membership" if vars=="member"
(1 real change made)

. replace vars="Anniversary year" if vars=="anniv"
(1 real change made)

. replace vars="Geographic distance" if vars=="logdistcap"
(1 real change made)

. replace vars="Communist regime" if vars=="communist"
(0 real changes made)

. replace vars="Leaders attending" if vars=="worldrulerl1"
(1 real change made)

. replace vars="Power concentration" if vars=="v2xnp_pres"
(0 real changes made)

. replace vars="Global events" if vars=="globalevent"
(1 real change made)

. 
. 
. 
. replace estimate=estimate*100
(9 real changes made)

. replace min95=min95*100
(9 real changes made)

. replace max95=max95*100 
(9 real changes made)

. gsort -estimate

. sencode vars, gen(var)

. 
.  twoway (rcap min max var,  lcolor(black) lwidth(0.1) horizontal)  ///
>      ||  (scatter var estimate, msymbol(d) mfcolor(white) msize(small)), ///
> ylabel(1 2 3 4 5 6 7 8 9 , valuelabel angle(0) labsize(small ) )  ///
>  ytitle("") xtitle("")  xscale(titlegap(*5)) scheme(s1mono) ///
> xline(0, lwidth(0.001) lcolor(gray) lpattern(dash))  ///
> title("Democratic leaders", size(medsmall ))  xlabel(-20(10)10, labsize(small)) ///
>  plotregion(margin( t+0 b+0))  legend(off) ysize(4) xsize(4)  

. graph export output/margins_dem.pdf, replace
(file /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/margins_dem.pdf written in PDF format)

. 
. clear

. 
. 
. 
. //*************************************************************//
. ///******  Figure 3 right bottom **************///
> //*************************************************************//
. 
. clear

. use estimation_file

. xtlogit executive worldrulerl1 v2xnp_pres   emergency   logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re

Fitting comparison model:

Iteration 0:   log likelihood = -1492.3218  
Iteration 1:   log likelihood = -1301.7178  
Iteration 2:   log likelihood = -1233.3669  
Iteration 3:   log likelihood = -1232.6213  
Iteration 4:   log likelihood = -1232.6192  
Iteration 5:   log likelihood = -1232.6192  

Fitting full model:

tau =  0.0     log likelihood = -1232.6192
tau =  0.1     log likelihood = -1221.3758
tau =  0.2     log likelihood = -1218.2273
tau =  0.3     log likelihood = -1219.0543

Iteration 0:   log likelihood =  -1218.227  
Iteration 1:   log likelihood = -1210.2433  
Iteration 2:   log likelihood = -1209.6979  
Iteration 3:   log likelihood = -1209.6953  
Iteration 4:   log likelihood = -1209.6953  

Random-effects logistic regression              Number of obs     =      4,338
Group variable: ccode                           Number of groups  =        134

Random effects u_i ~ Gaussian                   Obs per group:
                                                              min =          1
                                                              avg =       32.4
                                                              max =         61

Integration method: mvaghermite                 Integration pts.  =         12

                                                Wald chi2(12)     =     357.36
Log likelihood  = -1209.6953                    Prob > chi2       =     0.0000

------------------------------------------------------------------------------
   executive |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0520411   .0052362     9.94   0.000     .0417782    .0623039
  v2xnp_pres |  -1.555235   .3609455    -4.31   0.000    -2.262675   -.8477945
   emergency |   .1095163   .1243285     0.88   0.378    -.1341631    .3531958
  logdistcap |  -.7007159   .4599226    -1.52   0.128    -1.602148    .2007157
      member |   .0937764   .0288002     3.26   0.001     .0373291    .1502237
  loggdpsize |  -.0304254   .1149552    -0.26   0.791    -.2557334    .1948825
       anniv |  -.5508843   .1811702    -3.04   0.002    -.9059713   -.1957973
   communist |  -.5023057   .3272813    -1.53   0.125    -1.143765    .1391539
 globalevent |  -.0351283   .1781917    -0.20   0.844    -.3843776     .314121
    _spline1 |   .0185712   .0044121     4.21   0.000     .0099237    .0272187
    _spline2 |  -.0053189   .0013743    -3.87   0.000    -.0080125   -.0026252
    _spline3 |   .0005413   .0001844     2.94   0.003     .0001798    .0009027
       _cons |   .6138838   1.879378     0.33   0.744    -3.069629    4.297397
-------------+----------------------------------------------------------------
    /lnsig2u |   -.537728    .292111                     -1.110255    .0347991
-------------+----------------------------------------------------------------
     sigma_u |   .7642472   .1116225                      .5739991    1.017552
         rho |   .1507699   .0374014                      .0910317    .2393861
------------------------------------------------------------------------------
LR test of rho=0: chibar2(01) = 45.85                  Prob >= chibar2 = 0.000

. margins, dydx(*)  post

Average marginal effects                        Number of obs     =      4,338
Model VCE    : OIM

Expression   : Pr(executive=1), predict(pr)
dy/dx w.r.t. : worldrulerl1 v2xnp_pres emergency logdistcap member loggdpsize anniv communist globalevent _spline1 _spline2 _spline3

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
worldrulerl1 |   .0040622    .000427     9.51   0.000     .0032253    .0048991
  v2xnp_pres |  -.1213978   .0284395    -4.27   0.000    -.1771381   -.0656575
   emergency |   .0085486   .0097089     0.88   0.379    -.0104805    .0275776
  logdistcap |  -.0546962   .0359216    -1.52   0.128    -.1251013    .0157089
      member |     .00732   .0022724     3.22   0.001     .0028662    .0117737
  loggdpsize |  -.0023749    .008971    -0.26   0.791    -.0199577    .0152078
       anniv |  -.0430007   .0142149    -3.03   0.002    -.0708613     -.01514
   communist |  -.0392088   .0256693    -1.53   0.127    -.0895196    .0111021
 globalevent |   -.002742   .0139117    -0.20   0.844    -.0300084    .0245243
    _spline1 |   .0014496   .0003496     4.15   0.000     .0007644    .0021348
    _spline2 |  -.0004152   .0001087    -3.82   0.000    -.0006282   -.0002022
    _spline3 |   .0000422   .0000145     2.92   0.004     .0000139    .0000706
------------------------------------------------------------------------------

. parmest, saving(output/m2, replace) 
file output/m2.dta saved

. clear

. use output/m2

. drop in 10/12
(3 observations deleted)

. ren parm vars

. replace vars="Emergency session year" if vars=="emergency"
variable vars was str12 now str22
(1 real change made)

. replace vars="Lame duck" if vars=="lastterm"
(0 real changes made)

. replace vars="GDP, log" if vars=="loggdpsize"
(1 real change made)

. replace vars="Divided government" if vars=="divided"
(0 real changes made)

. replace vars="IO membership" if vars=="member"
(1 real change made)

. replace vars="Anniversary year" if vars=="anniv"
(1 real change made)

. replace vars="Geographic distance" if vars=="logdistcap"
(1 real change made)

. replace vars="Communist regime" if vars=="communist"
(1 real change made)

. replace vars="Leaders attending" if vars=="worldrulerl1"
(1 real change made)

. replace vars="Power concentration" if vars=="v2xnp_pres"
(1 real change made)

. replace vars="Global events" if vars=="globalevent"
(1 real change made)

. 
. 
. replace estimate=estimate*100
(9 real changes made)

. replace min95=min95*100
(9 real changes made)

. replace max95=max95*100 
(9 real changes made)

. gsort -estimate

. sencode vars, gen(var)

. 
. 
.  twoway (rcap min max var,  lcolor(black) lwidth(0.05) horizontal)  ///
>      ||  (scatter var estimate, msymbol(d) mfcolor(white) msize(small)), ///
> ylabel(1 2 3 4 5 6 7 8 9 , valuelabel angle(0) labsize(small ) )  yscale(alt) ///
>  ytitle("") xtitle("")  xscale(titlegap(*5)) scheme(s1mono) ///
> xline(0, lwidth(0.001) lcolor(gray) lpattern(dash))  ///
> title("Nondemocratic leaders", size(medsmall )) xlabel(-20(10)10, labsize(small)) ///
>  plotregion(margin(l-0 r-0 t+0 b+0))  legend(off) ysize(4) xsize(4)  

. graph export output/margins_nondem.pdf, replace         
(file /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/margins_nondem.pdf written in PDF format)

.                 
. 
. /*****************************************************************/
. ///***     Table 3: Interrupted Times Series       ***///
> /*****************************************************************/
. 
. clear

. use output/splines

. mkspline break1 1960 break2 1990 break3 2000 break4 2005 break5 = year

. 
. gen time = _n

. gen y1960=0

. gen y1990=0

. gen y2000=0

. gen y2005=0

. replace y1960=1 if year==1961
(1 real change made)

. replace y1990=1 if year==1991
(1 real change made)

. replace y2000=1 if year==2001
(1 real change made)

. replace y2005=1 if year==2006
(1 real change made)

. 
. 
. reg worldruler time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant 

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(9, 65)        =    151.88
       Model |  41876.3435         9  4652.92706   Prob > F        =    0.0000
    Residual |  1991.24667        65  30.6345642   R-squared       =    0.9546
-------------+----------------------------------   Adj R-squared   =    0.9483
       Total |  43867.5902        74  592.805273   Root MSE        =    5.5348

------------------------------------------------------------------------------
  worldruler |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |   .1467812   .1063996     1.38   0.172    -.0657135     .359276
       y1960 |   5.965624   5.740219     1.04   0.303    -5.498385    17.42963
      break2 |   .2211604    .189296     1.17   0.247    -.1568898    .5992106
       y1990 |   3.530294   5.739321     0.62   0.541    -7.931922    14.99251
      break3 |   .2602168   .3446813     0.75   0.453    -.4281592    .9485928
       y2000 |  -2.165316   5.947505    -0.36   0.717     -14.0433    9.712672
      break4 |   3.856974   .8290533     4.65   0.000      2.20124    5.512708
       y2005 |  -4.407316    6.02315    -0.73   0.467    -16.43638    7.621745
      break5 |   1.305868   .3377994     3.87   0.000     .6312365      1.9805
------------------------------------------------------------------------------

. est store m1

. reg regionruler1 time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant 

      Source |       SS           df       MS      Number of obs   =        73
-------------+----------------------------------   F(9, 64)        =    171.66
       Model |  44275.0558         9  4919.45064   Prob > F        =    0.0000
    Residual |  1834.14186        64  28.6584666   R-squared       =    0.9602
-------------+----------------------------------   Adj R-squared   =    0.9546
       Total |  46109.1976        73  631.632844   Root MSE        =    5.3534

------------------------------------------------------------------------------
regionruler1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |    .126317   .1058536     1.19   0.237    -.0851498    .3377838
       y1960 |   2.158033   5.563417     0.39   0.699    -8.956169    13.27224
      break2 |   .1687204   .1874649     0.90   0.371    -.2057837    .5432245
       y1990 |   1.320839   5.551704     0.24   0.813    -9.769964    12.41164
      break3 |   .3013089   .3336009     0.90   0.370    -.3651355    .9677533
       y2000 |  -7.126244   5.752543    -1.24   0.220    -18.61827    4.365781
      break4 |    5.01483   .8025247     6.25   0.000     3.411602    6.618057
       y2005 |  -2.466193    5.82565    -0.42   0.673    -14.10427    9.171881
      break5 |   1.219994   .3276249     3.72   0.000     .5654883      1.8745
------------------------------------------------------------------------------

. est store m3

. reg regionruler2 time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant 

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(9, 65)        =    153.09
       Model |  31440.8166         9  3493.42406   Prob > F        =    0.0000
    Residual |  1483.25827        65  22.8193581   R-squared       =    0.9549
-------------+----------------------------------   Adj R-squared   =    0.9487
       Total |  32924.0749        74   444.91993   Root MSE        =     4.777

------------------------------------------------------------------------------
regionruler2 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |   .1716006   .0918303     1.87   0.066    -.0117972    .3549983
       y1960 |   2.443016   4.954209     0.49   0.624    -7.451222    12.33725
      break2 |   .0745325   .1633756     0.46   0.650    -.2517512    .4008161
       y1990 |   5.131112   4.953434     1.04   0.304    -4.761579     15.0238
      break3 |   .2868088   .2974839     0.96   0.339    -.3073077    .8809253
       y2000 |    3.98686   5.133111     0.78   0.440    -6.264671    14.23839
      break4 |   3.738684   .7155307     5.23   0.000      2.30967    5.167697
       y2005 |  -7.894283   5.198398    -1.52   0.134     -18.2762    2.487635
      break5 |   .8925423   .2915444     3.06   0.003      .310288    1.474797
------------------------------------------------------------------------------

. est store m4

. reg regionruler3 time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant 

      Source |       SS           df       MS      Number of obs   =        73
-------------+----------------------------------   F(9, 64)        =     19.43
       Model |  29624.8698         9   3291.6522   Prob > F        =    0.0000
    Residual |  10843.7405        64  169.433445   R-squared       =    0.7320
-------------+----------------------------------   Adj R-squared   =    0.6944
       Total |  40468.6102        73  554.364524   Root MSE        =    13.017

------------------------------------------------------------------------------
regionruler3 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |   .2294769   .2573822     0.89   0.376    -.2847032     .743657
       y1960 |   -3.63334   13.52741    -0.27   0.789    -30.65745    23.39077
      break2 |  -.0382909   .4558196    -0.08   0.933    -.9488952    .8723134
       y1990 |   4.215616   13.49893     0.31   0.756     -22.7516    31.18283
      break3 |   .5783574   .8111483     0.71   0.478    -1.042098    2.198812
       y2000 |   -5.95048   13.98727    -0.43   0.672    -33.89326     21.9923
      break4 |   1.481456   1.951334     0.76   0.451    -2.416782    5.379693
       y2005 |  -7.020487   14.16503    -0.50   0.622    -35.31839    21.27741
      break5 |   1.774223   .7966178     2.23   0.029     .1827955     3.36565
------------------------------------------------------------------------------

. est store m5

. reg regionruler4 time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant 

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(9, 65)        =     60.74
       Model |  35109.5022         9   3901.0558   Prob > F        =    0.0000
    Residual |   4174.6252        65  64.2250031   R-squared       =    0.8937
-------------+----------------------------------   Adj R-squared   =    0.8790
       Total |  39284.1274        74  530.866586   Root MSE        =    8.0141

------------------------------------------------------------------------------
regionruler4 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |     .31081   .1540588     2.02   0.048     .0031334    .6184865
       y1960 |   3.444679   8.311409     0.41   0.680    -13.15435    20.04371
      break2 |  -.0843047   .2740865    -0.31   0.759    -.6316932    .4630838
       y1990 |   4.281637   8.310109     0.52   0.608     -12.3148    20.87807
      break3 |  -.0775308   .4990728    -0.16   0.877    -1.074248    .9191864
       y2000 |  -9.382009   8.611544    -1.09   0.280    -26.58045    7.816433
      break4 |   2.168855   1.200407     1.81   0.075    -.2285245    4.566234
       y2005 |  -1.996146   8.721072    -0.23   0.820    -19.41333    15.42104
      break5 |   2.131872   .4891083     4.36   0.000     1.155055    3.108689
------------------------------------------------------------------------------

. est store m6

. reg regionruler5 time y1960 break2 y1990 break3 y2000 break4  y2005 break5,  noconstant  

      Source |       SS           df       MS      Number of obs   =        74
-------------+----------------------------------   F(9, 65)        =    101.81
       Model |  66962.8106         9  7440.31228   Prob > F        =    0.0000
    Residual |   4750.3855        65  73.0828538   R-squared       =    0.9338
-------------+----------------------------------   Adj R-squared   =    0.9246
       Total |   71713.196        74  969.097244   Root MSE        =    8.5489

------------------------------------------------------------------------------
regionruler5 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
        time |  -.1537757   .1643395    -0.94   0.353    -.4819844    .1744331
       y1960 |   24.90705   8.866053     2.81   0.007     7.200314    42.61378
      break2 |   .9908648    .292377     3.39   0.001     .4069475    1.574782
       y1990 |   3.072743   8.864667     0.35   0.730    -14.63122     20.7767
      break3 |   .7212763   .5323774     1.35   0.180    -.3419547    1.784507
       y2000 |   8.143915   9.186217     0.89   0.379    -10.20223    26.49006
      break4 |   4.667477   1.280514     3.65   0.001     2.110113     7.22484
       y2005 |  -1.841359   9.303055    -0.20   0.844    -20.42084    16.73812
      break5 |   .8996719   .5217479     1.72   0.089    -.1423306    1.941674
------------------------------------------------------------------------------

. est store m7

. 
. estout m1  m3 m4 m5 m6 m7, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))   legend label varlabels(_cons constant)   ///
>  stats(N r2 , fmt(0  2 3) label(N R-squared )) style(tex) starlevels(+ 0.10 ** 0.05 *** 0.001)

                    &          m1   &          m3   &          m4   &          m5   &          m6   &          m7   \\
                    &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   &        b/se   \\
time                &       0.147   &       0.126   &       0.172+  &       0.229   &       0.311** &      -0.154   \\
                    &     (0.106)   &     (0.106)   &     (0.092)   &     (0.257)   &     (0.154)   &     (0.164)   \\
y1960               &       5.966   &       2.158   &       2.443   &      -3.633   &       3.445   &      24.907** \\
                    &     (5.740)   &     (5.563)   &     (4.954)   &    (13.527)   &     (8.311)   &     (8.866)   \\
year: (1960,1990)   &       0.221   &       0.169   &       0.075   &      -0.038   &      -0.084   &       0.991** \\
                    &     (0.189)   &     (0.187)   &     (0.163)   &     (0.456)   &     (0.274)   &     (0.292)   \\
y1990               &       3.530   &       1.321   &       5.131   &       4.216   &       4.282   &       3.073   \\
                    &     (5.739)   &     (5.552)   &     (4.953)   &    (13.499)   &     (8.310)   &     (8.865)   \\
year: (1990,2000)   &       0.260   &       0.301   &       0.287   &       0.578   &      -0.078   &       0.721   \\
                    &     (0.345)   &     (0.334)   &     (0.297)   &     (0.811)   &     (0.499)   &     (0.532)   \\
y2000               &      -2.165   &      -7.126   &       3.987   &      -5.950   &      -9.382   &       8.144   \\
                    &     (5.948)   &     (5.753)   &     (5.133)   &    (13.987)   &     (8.612)   &     (9.186)   \\
year: (2000,2005)   &       3.857***&       5.015***&       3.739***&       1.481   &       2.169+  &       4.667***\\
                    &     (0.829)   &     (0.803)   &     (0.716)   &     (1.951)   &     (1.200)   &     (1.281)   \\
y2005               &      -4.407   &      -2.466   &      -7.894   &      -7.020   &      -1.996   &      -1.841   \\
                    &     (6.023)   &     (5.826)   &     (5.198)   &    (14.165)   &     (8.721)   &     (9.303)   \\
year: (2005,.)      &       1.306***&       1.220***&       0.893** &       1.774** &       2.132***&       0.900+  \\
                    &     (0.338)   &     (0.328)   &     (0.292)   &     (0.797)   &     (0.489)   &     (0.522)   \\
N                   &          74   &          73   &          74   &          73   &          74   &          74   \\
R-squared           &        0.95   &        0.96   &        0.95   &        0.73   &        0.89   &        0.93   \\
+ p<0.10, ** p<0.05, *** p<0.001

. 
. 
.  
.  
.   
. 
end of do-file

. log close
      name:  <unnamed>
       log:  /Users/ALEX/Dropbox/Speakers and UN/Visits/ReplicationFolder/output/Analyses.log
  log type:  text
 closed on:   9 Nov 2023, 12:45:22
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
